#include <SFML/Graphics.hpp>

using namespace sf;
class ViewManager
{
private:
	RectangleShape& _target;
	View _camera;
	int _max_distance; // in pixels
public:
	ViewManager( RectangleShape& target, RenderWindow& window, int max_distance) : _target(target), _max_distance(max_distance)
	{
		_camera=window.getView();
	}

	void center_view(); //center the camera on the targeted object
	void follow_target();
	void reset_view();
	View& getView();

	~ViewManager() {}
};